#
# Looking for the libdc1394 ver. 2
#

FIND_PATH(DC1394_2_INCLUDE_DIR dc1394/control.h
    $ENV{DC1394_HOME}/include
    $ENV{DC1394_DIR}/include
    /usr/include )

FIND_LIBRARY(DC1394_2_LIBRARY
    NAMES dc1394
    PATHS
    $ENV{DC1394_HOME}/lib
    $ENV{DC1394_DIR}/lib
    /usr/lib
    )

IF(DC1394_2_LIBRARY AND DC1394_2_INCLUDE_DIR)
   SET(DC1394_FOUND TRUE)
   SET(DC1394_2_FOUND TRUE)
   SET(DC1394_VERSION 2)
   SET(DC1394_LIBRARIES ${DC1394_2_LIBRARY})
   SET(DC1394_2_INCLUDE_DIRS ${DC1394_2_INCLUDE_DIR})
   SET(DC1394_INCLUDE_DIRS ${DC1394_2_INCLUDE_DIRS})
   message(STATUS "Libdc1394 found")
   message(STATUS "   Libdc1394 includes : \t${DC1394_INCLUDE_DIRS}")
   message(STATUS "   Libdc1394 libraries : \t${DC1394_LIBRARIES}")
ENDIF(DC1394_2_LIBRARY AND DC1394_2_INCLUDE_DIR)


MARK_AS_ADVANCED(
    DC1394_1_LIBRARY
    DC1394_1_INCLUDE_DIR
    DC1394_2_LIBRARY
    DC1394_2_INCLUDE_DIR
    DC1394_INCLUDE_DIR
    DC1394_LIBRARIES
    DC1394_LIBRARY
    )
